import request from '@/config/axios'

// 查询发布规则列表
export const getPublishRuleList = (params) => {
  return request.get({ url: '/beidaRule/list', params })
}

// 获取发布规则详情
export const getPublishRule = (id: number) => {
  return request.get({ url: '/beidaRule/getById?id=' + id })
}

// 新增发布规则
export const savePublishRule = (data) => {
  return request.post({ url: '/beidaRule/saveOrUpdate', data })
}

// 删除发布规则
export const deletePublishRule = (data) => {
  return request.post({ url: '/beidaRule/delete', data})
}

// 启用发布规则
export const enablePublishRule = (params) => {
  return request.get({ url: '/beidaRule/updateStatus', params})
}
